#ifndef STRATEGY_PATTERN_H
#define STRATEGY_PATTERN_H

class Strategy
{
public:
    virtual ~Strategy() {}
    virtual int doOperation(int num1, int num2) = 0;
};

class OperationAdd : public Strategy
{
public:
    ~OperationAdd() {}

    int doOperation(int num1, int num2) override;
};

class OperationSubtract : public Strategy
{
public:
    ~OperationSubtract() {}

    int doOperation(int num1, int num2) override;
};

class OperationMultiply : public Strategy
{
public:
    ~OperationMultiply() {}

    int doOperation(int num1, int num2) override;
};

class Context
{
public:
    Context(Strategy* strategy);
    ~Context();

    int executeStrategy(int num1, int num2);

private:
    Strategy* strategy;
};

#endif // STRATEGY_PATTERN_H

/*
    Context* context = new Context(new OperationAdd());

    cout << "10 + 5 = " << context->executeStrategy(10, 5) << endl;

    context = new Context(new OperationSubtract());
    cout << "10 - 5 = " << context->executeStrategy(10, 5) << endl;

    context = new Context(new OperationMultiply());
    cout << "10 * 5 = " << context->executeStrategy(10, 5) << endl;
    */
